#include<bits/stdc++.h>
using namespace std ;

inline int read(){
	int s=0,w=1;char c=getchar();
	while(c<48||c>57) {if(c=='-') w=-1;c=getchar();}
	while(c>=48&&c<=57) s=(s<<1)+(s<<3)+c-48,c=getchar();
	return s*w;
}

int main(){

	srand(time(0));

	int T=1000;
	while(T--){
		int n=2000;
		ofstream hout("tatooine.in");
		
		hout<<n<<endl;
		for(int i=1;i<n;i++){
			hout<<i+1<<' '<<(rand()%(i)+1)<<' '<<(rand()%20+1)<<endl;
		}
		
		system("tatooine.exe");
		system("tatooine2.exe");
		if(system("fc tatooine.out tatooine.out2")) return 0;
	}

	return 0;
}



